-
Notifications
You must be signed in to change notification settings - Fork 637
🌱 Bump CAPI to v1.11 and k8s to v1.33 #5720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Welcome @clebs! |
|
Hi @clebs. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@richardcase This PR here based on @bryan-cox's: #5720 Changes:
Current state:
|
|
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be bumping KUBERNETES_VERSION_MANAGEMENT and KUBERNETES_VERSION_UPGRADE_FROM to target 1.33 in this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment on the subnet filtering regression
4d0faa6 to
e6be7ad
Compare
|
/test pull-cluster-api-provider-aws-e2e-blocking |
- Update core Kubernetes dependencies from v0.32.3 to v0.33.4: - k8s.io/api, k8s.io/apimachinery, k8s.io/client-go - k8s.io/apiserver, k8s.io/cli-runtime, k8s.io/kubectl - k8s.io/apiextensions-apiserver, k8s.io/component-base - Upgrade prometheus/client_golang from v1.19.1 to v1.22.0 - Update cel.dev/expr from v0.18.0 to v0.19.1 - Upgrade google/cel-go from v0.22.0 to v0.23.2 - Update golang.org/x/time from v0.8.0 to v0.9.0 - Upgrade gRPC from v1.67.3 to v1.68.1 - Update OpenTelemetry packages to v1.33.0 - Refresh k8s.io/utils and other indirect dependencies - Update kube-openapi and structured-merge-diff versions
- Upgrade cluster-api from v1.10.2 to v1.11.1 - Upgrade controller-runtime from v0.20.4 to v0.21.0 - Update various golang.org/x/* packages - Update testing dependencies (ginkgo, gomega) - Update OpenTelemetry and other indirect dependencies
Signed-off-by: Borja Clemente <[email protected]>
- Update all imports to v1beta2 types except for conditions staying in v1beta1. - Adapt source code to work with v1beta2 and deprecated conditions. - Manually update conversions. Signed-off-by: Borja Clemente <[email protected]>
Signed-off-by: Borja Clemente <[email protected]>
Signed-off-by: Borja Clemente <[email protected]>
Signed-off-by: Borja Clemente <[email protected]>
Signed-off-by: Borja Clemente <[email protected]>
Introducing v1beta2 on public types is a breaking change so they have to stay in v1beta1. Internally though, migration to v1beta2 is happening (except for conditions). Signed-off-by: Borja Clemente <[email protected]>
Signed-off-by: Borja Clemente <[email protected]>
Signed-off-by: Borja Clemente <[email protected]>
Signed-off-by: Borja Clemente <[email protected]>
Signed-off-by: Borja Clemente <[email protected]>
Signed-off-by: Borja Clemente <[email protected]>
Signed-off-by: Borja Clemente <[email protected]>
Signed-off-by: Borja Clemente <[email protected]>
Signed-off-by: Borja Clemente <[email protected]>
Signed-off-by: Borja Clemente <[email protected]>
Signed-off-by: Borja Clemente <[email protected]>
610720a to
7dc9647
Compare
|
@clebs: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some notes:
- I did not fully review the unit tests
- Using the label constants from v1beta2 can be okay (as long as the consts did not change), so these decisions are only comments, I think up to the maintainers to decide.
- I started to add these comments but stopped later on.
- As a follow up: all usages of
v1beta1conditionsshould be reviewed (places where we set v1beta1 conditions on CAPI objects like MachinePool) and considered if we additionally want to set a v1beta2 condition
| "k8s.io/apimachinery/pkg/util/sets" | ||
|
|
||
| clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" | ||
| clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes:
// Instance describes an AWS instance.
type Instance struct {
...
// Addresses contains the AWS instance associated addresses.
Addresses []clusterv1.MachineAddress `json:"addresses,omitempty"`
...to use the v1beta2 struct.
The v1beta2 struct does now set "omitempty" so there's a change in marshalling behavoir.
My personal opinion on this is: keep using v1beta1 here, but up to the CAPA maintainers.
Impact of keeping v1beta1:
We'd have to convert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed, in CAPA v1beta2 we keep using clusterv1beta1, so we should also do the same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must have been set back on the rebase... I went through all these on the public API.
Will do a more in depth verification.
| package v1beta1 | ||
|
|
||
| import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" | ||
| import clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Maybe worth adding to .golangci.yml that api/v1beta1 and api/v1beta2 are allowed to use that instead of adding the nolint everywhere.
| "sigs.k8s.io/cluster-api-provider-aws/v2/util/defaulting" | ||
| clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" | ||
| clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1" //nolint:staticcheck | ||
| clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2" |
We should be able to only use clusterv1beta1 here.
| } | ||
|
|
||
| if cluster.Spec.ControlPlaneRef == nil || cluster.Spec.ControlPlaneRef.Kind != "AWSManagedControlPlane" { | ||
| if cluster.Spec.ControlPlaneRef.Name == "" || cluster.Spec.ControlPlaneRef.Kind != "AWSManagedControlPlane" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if cluster.Spec.ControlPlaneRef.Name == "" || cluster.Spec.ControlPlaneRef.Kind != "AWSManagedControlPlane" { | |
| if cluster.Spec.ControlPlaneRef.IsDefined() || cluster.Spec.ControlPlaneRef.Kind != "AWSManagedControlPlane" { |
| } | ||
|
|
||
| if !cluster.Status.InfrastructureReady { | ||
| if !meta.IsStatusConditionTrue(cluster.GetConditions(), string(clusterv1beta1.InfrastructureReadyCondition)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The replacement is cluster.Status.Initialization.InfrastructureProvisioned
| if !meta.IsStatusConditionTrue(cluster.GetConditions(), string(clusterv1beta1.InfrastructureReadyCondition)) { | |
| if !ptr.Deref(cluster.Status.Initialization.InfrastructureProvisioned, false) { |
| new: --metrics-bind-addr=:8080 | ||
| - name: v1.10.2 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. | ||
| value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.10.2/core-components.yaml" | ||
| - name: v1.11.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - name: v1.11.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. | |
| - name: v1.11.1 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. |
| new: --metrics-bind-addr=:8080 | ||
| - name: v1.10.2 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. | ||
| value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.10.2/bootstrap-components.yaml" | ||
| - name: v1.11.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - name: v1.11.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. | |
| - name: v1.11.1 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. |
| new: --metrics-bind-addr=:8080 | ||
| - name: v1.10.2 # latest published release in the v1beta1 series; this is used for v1beta1 --> v1beta1 latest clusterctl upgrades test only. | ||
| value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.10.2/control-plane-components.yaml" | ||
| - name: v1.11.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> v1beta1 latest clusterctl upgrades test only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - name: v1.11.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> v1beta1 latest clusterctl upgrades test only. | |
| - name: v1.11.1 # latest published release in the v1beta1 series; this is used for v1beta1 --> v1beta1 latest clusterctl upgrades test only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: the comment does not fit here.
As this releases is the v1beta2 series.
| func pausedCondition(scheme *runtime.Scheme, cluster *clusterv1.Cluster, obj ConditionSetter, targetConditionType string) clusterv1.Condition { | ||
| if (cluster != nil && cluster.Spec.Paused) || annotations.HasPaused(obj) { | ||
| func pausedCondition(scheme *runtime.Scheme, cluster *clusterv1.Cluster, obj ConditionSetter, targetConditionType string) clusterv1beta1.Condition { | ||
| if (cluster != nil && cluster.Spec.Paused != nil && *cluster.Spec.Paused) || annotations.HasPaused(obj) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (cluster != nil && cluster.Spec.Paused != nil && *cluster.Spec.Paused) || annotations.HasPaused(obj) { | |
| if (cluster != nil && ptr.Deref(cluster.Spec.Paused, false) || annotations.HasPaused(obj) { |
| if (cluster != nil && cluster.Spec.Paused != nil && *cluster.Spec.Paused) || annotations.HasPaused(obj) { | ||
| var messages []string | ||
| if cluster != nil && cluster.Spec.Paused { | ||
| if cluster != nil && cluster.Spec.Paused != nil && *cluster.Spec.Paused { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if cluster != nil && cluster.Spec.Paused != nil && *cluster.Spec.Paused { | |
| if cluster != nil && ptr.Deref(cluster.Spec.Paused, false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some notes:
- I did not fully review the unit tests
- Using the label constants from v1beta2 can be okay (as long as the consts did not change), so these decisions are only comments, I think up to the maintainers to decide.
- I started to add these comments but stopped later on.
- As a follow up: all usages of
v1beta1conditionsshould be reviewed (places where we set v1beta1 conditions on CAPI objects like MachinePool) and considered if we additionally want to set a v1beta2 condition - Also to fix fuzz tests: we now need to use
randfill.Continueinstead offuzz.Continue.
What type of PR is this?
/kind support
What this PR does / why we need it:
This PR bumps CAPI to v1.11.0, and k8s to v1.33.3.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #5593
Replaces #5624
Special notes for your reviewer:
Checklist:
Release note: